<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>List Repair Shop</title>
    <meta name="layout" content="main">
  </head>
  <body>
    <br>
    <g:link class="list" action="newRepairShop">
      <div class="tabSelected">
        Repair Shop
      </div>
    </g:link>
  
    <g:link class="list" action="newCustomer">
      <div class="tabNoSelected">
        Customer
      </div>
    </g:link>
  
    <g:link class="list" action="newMechanicalTechnician">
      <div class="tabNoSelected">
        Mechanical Technician
      </div>
    </g:link>
  
    <g:link class="list" action="newVehicle">
      <div class="tabNoSelected">
        Vehicle
      </div>
    </g:link>
  
    <g:link class="list" action="logout" controller="LogIn">
      <div class="tabNoSelected">Log Out</div>
    </g:link>
  
    <div class="tabContent"> 
      <g:link class="list" action="newRepairShop" >
        <div class="tabNoSelected">
          New
        </div>
      </g:link>
      <g:link class="list" action="listRepairShop" >
        <div class="tabSelected">
          List
        </div>
      </g:link>
    </div>
    <hr>
    
    <table>
      <thead>
        <tr>

      <g:sortableColumn property="name" title="${message(code: 'repairShop.name.label', default: 'Name')}" />

      <g:sortableColumn property="address" title="${message(code: 'repairShop.address.label', default: 'Address')}" />

      <g:sortableColumn property="phone" title="${message(code: 'repairShop.phone.label', default: 'Phone')}" />


      <g:sortableColumn property="username" title="${message(code: 'repairShop.username.label', default: 'Username')}" />

      </tr>
      </thead>
      <tbody>
      <g:each in="${repairShopInstanceList}" status="i" var="repairShopInstance">
        <tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

          <td><g:link action="editRepairShop" id="${repairShopInstance.id}">${fieldValue(bean: repairShopInstance, field: "name")}</g:link></td>

        <td>${fieldValue(bean: repairShopInstance, field: "address")}</td>

        <td>${fieldValue(bean: repairShopInstance, field: "phone")}</td>

        

        <td>${fieldValue(bean: repairShopInstance, field: "username")}</td>

        </tr>
      </g:each>
      </tbody>
    </table>
  </body>
</html>
